
## Purpose

This repository contains the full pipeline for processing memtransistor simulation data, training GRU and LSTM neural networks, and evaluating model performance on the test dataset.

## Repository Content   

1. interpolation.py – Interpolates raw CSV files to a fixed number of timesteps.
2. preprocessing.py – Normalizes the Current(I) and scales the input parameters (Min–Max scaling) to prepare the data for neural network training.
3. gru_model_standalone.py – Defines the GRU network architecture.
4. gru_training.py – Training script for the GRU model.
5. evaluation_gru.py – Evaluates the trained GRU model on the test dataset.
6. lstm_model_standalone.py – Defines the LSTM network architecture.
7. lstm_training.py – Training script for the LSTM model.
8. evaluation_lstm.py – Evaluates the trained LSTM model on the test dataset.
9. chrono_initialization.py – Chrono initialization implementation for recurrent networks.
10. generated_data_5d.zip – 5D dataset (CSV files).
11. dataset_7d.zip – 7D dataset (CSV files).
12. dataset_9d.zip – 9D dataset (CSV files).

## Description and workflow 

The raw datasets generated from the charge transport model are provided in CSV format (generated_data_5d.zip, dataset_7d.zip, dataset_9d.zip). Each CSV file corresponds to one complete memtransistor I–t (and I–V) cycle together with the associated simulation parameters.
The processing and training workflow is as follows:

1. Interpolation:
   Run interpolation.py to interpolate the raw CSV files and standardize each cycle to a fixed number of timesteps.

2. Preprocessing:
   Run preprocessing.py to normalize the current and apply Min–Max scaling to the input parameters. This step prepares the data for neural network training.

3. Model training
   Train the model using either: (Note: The training scripts accept command-line arguments.)
   gru_training.py for the GRU network, or
   lstm_training.py for the LSTM network.

4. Evaluation
   Evaluate the trained model on the test dataset using: (Note: The evaluation scripts accept command-line arguments.)
   evaluation_gru.py (GRU), or
   evaluation_lstm.py (LSTM).

## Notes 
1. Interpolation must be performed before preprocessing.
2. Preprocessing must be completed before training the neural networks. The input of this step is the output of prevoius step (interpolation.py)
3. The datasets correspond to three parameter dimensionalities: 5D, 7D, and 9D.

